package com.example.vspm.service.impl;

import com.example.vspm.entity.TaskForm;
import com.example.vspm.mapper.TaskFormMapper;
import com.example.vspm.service.SenderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = RuntimeException.class)
public class SenderServiceImpl implements SenderService {
    @Autowired
    private TaskFormMapper senderMapper;

    @Override
    public List<TaskForm> tasks(int state) {
        List<TaskForm> taskFormList = senderMapper.tasks(state);
        return taskFormList;
    }

    @Override
    public List<TaskForm> findByPid2(int pid2) {
        List<TaskForm> taskFormList = senderMapper.findTaskByPid(pid2);
        return taskFormList;
    }
}
